<!--头部开始-->
<header>
<if condition="$app_name eq 'home' && empty($visitor) && $controll_name eq 'index'">
<div class="hd-wrap">
            <div class="hd" id="anony-nav">
                <div class="logo">
                    <h1><a href="__SITE_URL__" title="爱客开源">爱客开源</a></h1>
                </div>
                <div class="anony-srh">
                <form onsubmit="return searchForm(this);" method="post" action="{:U('home/search/index')}">
                <span class="inp"><input type="text" autocomplete="off" placeholder="书籍、电影、音乐、小组、小站、成员" size="12" maxlength="60" class="key" name="q"></span>
                <span class="bn"><input type="submit" value="搜索"></span>
                </form>
                </div>
                
                <div class="top-nav-items">
                <ul>
                <li><a href="__SITE_URL__" class="lnk-home" target="_blank">爱客首页</a></li>
                <li><a href="{:U('group/index/index')}" class="lnk-group" target="_blank">爱客小组</a></li>
                <li><a href="{:U('article/index/index')}" class="lnk-article" target="_blank">爱客阅读</a></li>
                <li><a href="{:U('location/index/index')}" class="lnk-location" target="_blank">爱客同城</a></li>
                <li><a href="{:U('site/index/index')}" class="lnk-site" target="_blank">爱客小站</a></li>
                <li><a href="{:U('mall/index/index')}" class="lnk-mall" target="_blank">爱客商城</a></li>
                </ul>
                </div>
            </div>
</div>

<else />

<div class="top_nav">
  <div class="top_bd">
    
    <div class="top_info">
        <empty  name="visitor">
		<a href="{:U('home/user/login')}">登录</a>
         | <a href="{:U('home/user/register')}">注册</a>
         | <a href="{:U('home/oauth/index', array('mod'=>'qq'))}" target="_blank" style="margin-left:10px"><img  align="absmiddle" title="QQ登录" src="__PUBLIC__/Static/images/connect_qq.png"> 登录</a>
          | <a href="{:U('home/oauth/index', array('mod'=>'sina'))}" target="_blank" style="margin-left:10px"><img  align="absmiddle" title="新浪微博" src="__PUBLIC__/Static/images/connect_sina_weibo.png"> 登录</a>    
        <else/>
        <a id="newmsg" href="{:U('home/message/ikmail',array('d'=>'inbox'))}">新消息({$count_new_msg})</a> | 
        <if condition="empty($visitor['doname'])">
		<a href="{:U('space/index/index', array('id'=>$visitor['userid']))}">
		<else/>
		<a href="{:U('space/index/index', array('id'=>$visitor['doname']))}">
		</if>
        	{$visitor.username}
        </a> | 
        <a href="{:U('home/user/setbase')}">设置</a> | 
        <a href="{:U('home/user/logout')}">退出</a>
        </empty>
    </div>


    <div class="top_items">
        <ul>
             <foreach name="topNav" item="item" >
              <li><a href="{$item['url']}" title="{$item['name']}">{$item['name']}</a></li>
             </foreach>
             <li><a href="{:U('home/help/download')}" style="color:#fff">IKPHP源码下载</a></li>                                                      
        </ul>
    </div>
  	<div class="cl"></div>
    
  </div>
  
</div>

</if>
<!--APP NAV-->

</header>

<if condition="$app_name eq 'home' && !empty($visitor)">

<div id="header">
    
	<div class="site_nav">
        <div class="{$logo['style']}">
            <a href="{$logo['url']}">{$logo['name']}</a>
        </div>
		<div class="appnav">
			    <ul id="nav_bar">
                    <foreach name="arrNav" item="item" >
                    <li><a href="{$item['url']}" class="a_{$key}">{$item['name']}</a></li>
                    </foreach>
			    </ul>
		   <form onsubmit="return searchForm(this);" method="post" action="{:U('home/search/index')}">
                <input type="hidden" value="all" name="type">
                <div id="search_bar">
                    <div class="inp"><input type="text" placeholder="小组、话题、日志、成员、小站" value="" class="key" name="q"></div>
                    <div class="inp-btn"><input type="submit" class="search-button" value="搜索"></div>
                </div>
		    </form>
		</div>
        <div class="cl"></div>
	</div>
        
</div>
</if>